import java.util.Scanner;

/**
 * @author: gao
 * @create-date: 2025/5/29 20:23
 */

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            int pass = 0;
            int fail = 0;

            int n = in.nextInt();
            int[] stu = new int[n];
            for (int i = 0; i < n; i++) {
                stu[i] = in.nextInt();
            }
            for (int i : stu) {
                try {
                    if (i < 0 || i > 100) {
                        throw new InputException(i);
                    }
                    if (i < 60) {
                        fail++;
                    } else {
                        pass++;
                    }
                } catch (InputException e) {
                    System.out.println(e.toString());
                }
            }
            System.out.println(pass);
            System.out.println(fail);
        }
    }
}

class InputException extends Exception {
    private int score;

    public InputException(int score) {
        super();
        this.score = score;
    }


    @Override
    public String toString() {
        return score + "invalid!";
    }
}